package com.jackson;

import com.jackson.service.RabbitMqService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/*
 * Author: JacksonCoder
 * FileName: ProducerApplication
 * Version: 1.0.0
 */
@SpringBootApplication
public class ProducerApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ProducerApplication.class, args);
        RabbitMqService rabbitMqService = (RabbitMqService) run.getBean("rabbitmqService");
//        rabbitmqService.sendRoutingMessage();
//        rabbitmqService.sendTopicMessage();
        rabbitMqService.sendMessage("confirm确认测试消息");

//        for(int i = 0 ; i < 10 ; i++){
//            rabbitmqService.sendMessage("RabbitMq大爷你好！！！" + i);
//            rabbitmqService.sendFanoutMessage(i+"用户欠费了");
//        }


    }
}
